<?php
namespace Home\Model;
use Think\Model;
class ArticleModel extends Model {

	//获取所有的投票记录
	public function get_allvote_list($article_type){
		$Model = new Model();
		$query = $Model->query('select v.article_id,count(*) as vote_num,a.article_title,a.article_thumb from think_vote v left join think_article a on a.article_id=v.article_id where v.article_type='.$article_type.' group by v.article_id order by count(*) desc limit 0,3');
		return $query;
	}

}